package Search;

import org.junit.Test;

/**
 * @Classname JZ44数字序列中某一位的数字
 * @Description TODO
 * @Date 2023/3/7 21:28
 * @Created by xjl
 */
public class JZ44数字序列中某一位的数字 {

    public int findNthDigit(int n) {
        String result="";
        for (int i=0;i<Integer.MAX_VALUE;i++){
            result+=String.valueOf(i);
        }
        return Integer.valueOf(result.charAt(n));
    }

    @Test
    public void test(){
        int nthDigit = findNthDigit(3);
        System.out.println(nthDigit);
    }
}
